<template>
	<view class="goods-container">
		<navigator :url="`/pages/goods/detail?id=${item.id}`"  hover-class="none" >
			<u-image width="100%" height="300rpx" :src="item.cover_url" class="u-p-t-20 u-p-b-20"></u-image>
			<view class="title u-text-center u-line-1">{{item.title}}</view>
			<view class="u-flex u-p-t-20 u-p-b-40">
				<text class="price">¥ {{item.price}}</text>
				<text class="sales">销量：{{item.sales}}</text>
			</view>
		</navigator>
	</view>
</template>

<script>
	
	export default {
		name:"goods",
		data() {
			return {
			};
		},
		props: {
			item: {
				type: Object,
				default:{}
			}
		},
		methods:{
			test(){
				console.log(11123)
			}
		}
	}
</script>

<style lang="scss" scoped> 
	.goods-container {
		background-color: #FFFFFF;
		.u-flex{
			justify-content: space-around;
			.price{
				color: $u-type-error;
			}
			.sales{
				color: $u-type-info;
			}
		}
		.title {
			background-color: #FFFFFF;
			font-weight: 800;
			font-size: 36rpx;
		}
	}
</style>
